﻿using DotLiquid;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace FastCodeGeneration.Entity
{

    [LiquidType("*")]
    [SugarTable("sys_table")]//当和数据库名称不一样可以设置表别名 指定表明
    public class Table
    {

        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public int? Id { get; set; }

        /// <summary>
        /// 项目id
        /// </summary>
        [SugarColumn(ColumnName = "project_Id")]
        public int? ProjectId { get; set; }

        /// <summary>
        /// 表名
        /// </summary>
        [SugarColumn(ColumnName = "name")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 表备注
        /// </summary>
        [SugarColumn(ColumnName = "description")]
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// 模块名
        /// </summary>
        [SugarColumn(ColumnName = "module_name")]
        public string ModuleName { set; get; } = string.Empty;

        /// <summary>
        /// 表前缀
        /// </summary>
        [SugarColumn(ColumnName = "prefix")]
        public string Prefix { set; get; } = string.Empty;

        /// <summary>
        /// 文件保存路径
        /// </summary>
        [SugarColumn(ColumnName = "file_Paths")]
        public string FilePaths { set; get; } = string.Empty;

        /// <summary>
        /// 类名
        /// </summary>
        [SugarColumn(ColumnName = "class_name")]
        public string ClassName { set; get; } = string.Empty;

        /// <summary>
        /// 字段名
        /// </summary>
        [SugarColumn(ColumnName = "field_class_name")]
        public string FieldClassName { set; get; } = string.Empty;

        [SugarColumn(IsIgnore = true)]
        public string ProjectName { set; get; } = string.Empty;

    }
}
